package com.lyj.service.impl;

import com.lyj.mapper.VacationMapper;
import com.lyj.pojo.Vacation;
import com.lyj.service.VacationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VacationServiceImpl implements VacationService {

    @Autowired
    VacationMapper vacationMapper;

    //查询全部请假信息
    @Override
    public List<Vacation> queryAllVacation() {

        List<Vacation> vacationList = vacationMapper.queryAllVacation();
        return vacationList;
    }

    @Override
    public List<Vacation> queryVacationByName(String username) {

        List<Vacation> vacationList = vacationMapper.queryVacationByName(username);
        return vacationList;
    }

    @Override
    public Boolean delVacationByVacaId(int vacationId) {

        Boolean aBoolean = vacationMapper.delVacationByVacaId(vacationId);
        return aBoolean;
    }
}
